FROM python:3.10-bookworm

# model to download
ENV MODEL_NAME="Qwen/Qwen2.5-72B-Instruct-GPTQ-Int4"

# model downloaded directory
ENV MODELSCOPE_HOME="/modelscope/"


# install modelscope cli
RUN set -eux; \
    mkdir -p ${MODELSCOPE_HOME}; \
    pip install --no-cache-dir -i https://mirrors.cloud.tencent.com/pypi/simple modelscope


# entry point
CMD modelscope download --model "${MODEL_NAME}" --local_dir ${MODELSCOPE_HOME}
